/**
 * 
 */
package com.hollycrm.hollysqm.handle.service.factory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hollycrm.hollysqm.handle.service.PlanChain;
import com.hollycrm.hollysqm.handle.service.i8.I8PlanChainService;
import com.hollycrm.hollysqm.handle.service.v8.V8PlanChainService;
import com.hollycrm.hollysqm.util.Constant;

/**
 * @author jianglong
 * @date 2017年4月1日 上午10:31:27
 */
@Service
public class PlanChainFactory {
	
	@Autowired
	private V8PlanChainService v8PlanChainService ;
	@Autowired
	private I8PlanChainService i8PlanChainService;
	
	/**
	 * 根据tag获取执行质检抽取的业务对象（v8|i8）
	 * @param tag
	 * @return
	 */
	public PlanChain getPlanChain(String tag){
		if (Constant.V8.equals(tag)){
			return v8PlanChainService;
		}else if (Constant.I8.equals(tag)){
			return i8PlanChainService;
		}		
		return null;
	}	
	
}
